﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RoyEngine
{
    class RoyHashsetInfo
    {
        internal byte[][] Keys { get; set; }

        internal List<RoyValueInfo> Properties
        {
            get { return _properties; }
            set
            {
                _properties = value;
                foreach (var v in value)
                {
                    _propertiesDic[v.PropertyInfo.Name] = v;
                }
            }
        }

        private readonly Dictionary<string, RoyValueInfo> _propertiesDic = new Dictionary<string, RoyValueInfo>();
        private List<RoyValueInfo> _properties;

        internal RoyValueInfo this[string propertyName]
        {
            get { return _propertiesDic[propertyName]; }
        }
    }
}
